package com.mercury.tests;

import org.hibernate.Session;
import org.hibernate.*;

import com.mercury.beans.*;

public class Test6 {

	public static void main(String[] args) {
		Session session = HibernateUtil.currentSession();
		
		Transaction tx = session.beginTransaction();
		Game game = new Game(100,"Red Alert");
		Player p = new Player(30,"Steven");
		
		p.setGame(game);
		session.save(p);
		tx.commit();
		
		HibernateUtil.closeSession();
	}
}
